'''
pip install pydantic aiohttp
'''
# dump one
import shutil
if p_qa.exists():
    shutil.rmtree(p_qa.as_posix())
p_qa.mkdir(parents=True, exist_ok=True)
# -------------------------------------------------- 
# 🦜 ^^ ⚠️ above are dangerous


# --------------------------------------------------
# ask one
p_qa = Path.cwd().parent / "ixc-qa0"
# s = Sess.new(model="llama3.2", url="http://localhost:11434/v1", key='<mock-key>')
# s = Sess.new(model="deepseek-r1:7b", url="http://localhost:11434/v1", key='<mock-key>', think_chunk_mode=True)
k = json.loads(Path("/home/me/.ssh/k-250611-h3c.json").read_text())
s = Sess.new(model="openai/gpt-4o-mini", url=k['url'], key=k['key'])

s.add_q('hi'); await s.ask_for_a(); s.ms
# ask more
s.add_q("Please solve x for x + 3 = 5");await s.ask_for_a();s.ms
# save
s.note = "A math test for gpt-4o-mini";s.dump_to_db(p_qa)
